package model

import (
	"IrisStandard/storage"
	"IrisStandard/util"
	"time"
)

type User struct {
	UserId	      string 		`xorm:"varchar(12) notnull pk"`
	Phone	      string		`xorm:"varchar(24) notnull unique"`
	Password  	  string 		`xorm:"varchar(48) notnull"`
	CreateDate 	  time.Time	 	`xorm:"created"`
	UpdateDate 	  time.Time	 	`xorm:"updated"`
	DeleteDate	  time.Time		`xorm:"deleted"`
}

func init() {
	err := storage.Mysql.Sync2(new(User))
	util.FailOnException("An error occurred while creating the table User", err)
}